package 设计模式.观察者模式.观察者实现方式;

import java.math.BigDecimal;

public class Main {
    public static void main(String[] args) {
        Stock stock = new Stock();
        Billboard billboard = new Billboard();
        stock.attach(billboard);
        stock.setPrice(new BigDecimal(199.9));
        Monitor monitor = new Monitor();
        stock.attach(monitor);
        stock.setPrice(new BigDecimal(200));
    }
}
